import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/Login.vue'
import Index from '../components/Index.vue'
import U_main from '../components/U_main.vue'
import U_store from '../components/U_store.vue'
import U_foods from '../components/U_foods.vue'
import U_comment from '../components/U_comment.vue'
import Register from '../components/Register.vue'
import U_commentVue from '../components/U_comment.vue'
import Orderes from '../components/Orderes.vue'
import Cart from '../components/Cart.vue'
import SubmitCart from '../components/SubmitCart'
import StoreInfo from '../components/StoreInfo.vue'
import Recommand_food from '../components/Recommand_food.vue'

Vue.use(Router)

export default new Router({
  routes: [
   {
     path: '/',
     component: Login,
   },
   {
     path: '/login',
     component: Login,
   },
   {
     path: '/register',
     component: Register,
   },

   {
     path: '/index',
     component: Index,
     children:[
       {
         path: '/u_main',
         component: U_main,
       },
       {
         path: '/u_store',
         component: U_store,
         children:[
              {
               path: '/u_foods',
               component: U_foods,
             },
             {
               path: '/u_comment',
               component: U_comment,
             },
             {
               path: '/storeInfo',
               component: StoreInfo,
             },
         ]
       },
       {
         path: '/orderes',
         component: Orderes,
       },
       {
         path: '/cart',
         component: Cart,
       },
       {
         path:'/submitCart',
         component: SubmitCart,
       },
        {
         path: '/recommand_food',
         component: Recommand_food,
       },
     ]
   },

  ]
})
